﻿using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

namespace DotnetUtil.Services
{
    public interface IHttpService
    {
        Task<Tuple<bool, string>> GetAsync(string url, CancellationToken token = default);

        Task<Tuple<bool, string>> GetAsync(string url, Dictionary<string, object> queryParamDictionary,
            CancellationToken token = default);

        Task<Tuple<bool, string>> PostAsync(string url, string body, CancellationToken token = default);
        Task<Tuple<bool, string>> DeleteAsync(string url);
        Task<Tuple<bool, string>> PutAsync(string url, string body);
        Task<Tuple<bool, string>> PatchAsync(string url, string body);

        Task<Tuple<bool, T, string>> GetAsync<T>(string url);
        Task<Tuple<bool, T, string>> GetAsync<T>(string url, Dictionary<string, object> queryParamDictionary);

        Task<Tuple<bool, string>> UploadFileAsync(string url, string fileName);
        Task<Tuple<bool, string>> DownloadFileAsync(string url, string fileName);
    }
}
